﻿

using IotContract.Models.Clients.Hks;
using IotContract.Models.Jobs;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HbcServerProcess.Interfaces;
/// <summary>
/// 调度任务
/// </summary>
public interface IProcessJobService
{
    /// <summary>
    /// 入库任务
    /// </summary>
    ConcurrentDictionary<string, ScEnterJob> ScEnterJobDic { get; set; }

    /// <summary>
    /// 堆垛机出库任务
    /// </summary>
    ConcurrentDictionary<string, ScOutJob> ScOutJobDic { get; set; }

    /// <summary>
    /// 堆垛机移库任务
    /// </summary>
    ConcurrentDictionary<string, ScMoveJob> ScMoveJobDic { get; set; }

    /// <summary>
    /// 充放电预约任务
    /// </summary>
    ConcurrentDictionary<string, HkWriteInstruct> HkFMTAppointDic { get; set; }

    /// <summary>
    /// 添加堆垛机入库任务
    /// </summary>
    /// <param name="enterJobs"></param>
    Task<string> AddScEnterJob(ScEnterJob job);
    /// <summary>
    /// 添加堆垛机移库任务
    /// </summary>
    /// <param name="job"></param>
    /// <returns></returns>
    Task<string> AddScMoveJob(ScMoveJob job);

    /// <summary>
    /// 添加堆垛机出库任务 999是火警任务
    /// </summary>
    /// <param name="job"></param>
    /// <exception cref="Exception"></exception>
    /// <exception cref="NoControlException"></exception>
    Task<string> AddScOutJob(ScOutJob job);
    /// <summary>
    /// 移除移库任务
    /// </summary>
    /// <param name="job"></param>
    /// <returns></returns>
    Task<bool> RemoveMoveJob(ScMoveJob job);

    /// <summary>
    /// 移除入库任务
    /// </summary>
    /// <param name="job"></param>
    /// <returns></returns>
    Task<bool> RemoveEnterJob(ScEnterJob job);
    /// <summary>
    /// 移除出库任务
    /// </summary>
    /// <param name="job"></param>
    /// <returns></returns>
    Task<bool> RemoveOutJob(ScOutJob job);
}
